home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-10-27 | 7.1 KB | 245 lines | [TEXT/KAHL] |
- // -----------------------------------------------------------------------------
- // File : demoTab.r
- // Date : November 5, 1994
- // Author : Jim Stout
- // Purpose : resource descriptions for a couple of tabPanels that demonstrate
- // : a single row panel and panels with other than 4 tabs per row.
- // -----------------------------------------------------------------------------
- #define SystemSevenOrLater 1
- #include <Types.r>
- #include "jimsCDEF.h"
-
- #define ROW1 16 // best control size for 1, 2 and 3 rows of tabs
- #define ROW2 32
- #define ROW3 48
-
- // -----------------------------------------------------------------------------
- // the first tabDemo shows a panel with 2 rows of 5 tabs each rather than the
- // default of 4 tabs per row.
- // -----------------------------------------------------------------------------
- resource 'dctb' (160, purgeable) {
- {
- /* [1] */ wContentColor, 65535,65535,65535, // white
- /* [2] */ wFrameColor, 0, 0, 0,
- /* [3] */ wTextColor, 0, 0, 0,
- /* [4] */ wHiliteColor, 0, 0, 0,
- /* [5] */ wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- resource 'DLOG' (160, "Tab Demo 1", purgeable) {
- {44, 20, 334, 470}, movableDBoxProc, invisible, nogoAway, 0x0, 160,
- "Tab Demo 1",
- #if SystemSevenOrLater
- centerMainScreen
- #endif
- };
-
- resource 'DITL' (160, "Tab Demo 1", purgeable) {
- {
- /* [1] */ {257, 379, 277, 437}, Button { enabled, "OK" },
- /* [2] */ {257, 308, 277, 366}, Button { enabled, "Cancel"},
- /* [3] */ {13, 13, 13+ROW2, 437}, Control { enabled, 160 },
- /* [4] */ {257, 13, 277, 300}, StaticText { disabled,
- "Press cmd-Tab or cntl-Tab"}
- }
- };
-
- resource 'CNTL' (160, "5 tabs", purgeable) {
- {13, 13, 13+ROW2, 437},
- 1,
- visible,
- 10,
- 230,
- 16*tabPanel,
-
- 5, // ask for 5 tabs per row - 2 full rows
-
- "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
- };
-
- // -----------------------------------------------------------------------------
- // the second tabDemo shows a panel with 3 rows of 3 tabs each rather than the
- // default of 4 tabs per row.
- // -----------------------------------------------------------------------------
- resource 'dctb' (180, purgeable) {
- {
- /* [1] */ wContentColor, 61166,61166,61166, // gray
- /* [2] */ wFrameColor, 0, 0, 0,
- /* [3] */ wTextColor, 0, 0, 0,
- /* [4] */ wHiliteColor, 0, 0, 0,
- /* [5] */ wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- resource 'DLOG' (180, "Tab Demo 2", purgeable) {
- {44, 20, 334, 470}, movableDBoxProc, invisible, nogoAway, 0x0, 180,
- "Tab Demo 2",
- #if SystemSevenOrLater
- centerMainScreen
- #endif
- };
-
- resource 'DITL' (180, "Tab Demo 2", purgeable) {
- {
- /* [1] */ {257, 379, 277, 437}, Button { enabled, "OK" },
- /* [2] */ {257, 308, 277, 366}, Button { enabled, "Cancel"},
- /* [3] */ {13, 13, 13+ROW3, 437}, Control { enabled, 180 },
- /* [4] */ {257, 13, 277, 300}, StaticText { disabled,
- "Press cmd-Tab or cntl-Tab"}
- }
- };
-
- resource 'CNTL' (180, "3 tabs", purgeable) {
- {13, 13, 13+ROW3, 437},
- 1,
- visible,
- 9,
- 230,
- 16*tabPanel,
-
- 3, // ask for 3 tabs per row - 3 full rows
-
- "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
- };
-
- // -----------------------------------------------------------------------------
- // the third tabDemo shows a panel with 10 tabs, but using the default of 4
- // tabs per row - which results in 2 rows of 4 tabs and 1 row of 2 tabs.
- // -----------------------------------------------------------------------------
- resource 'dctb' (190, purgeable) {
- {
- /* [1] */ wContentColor, 52428,52428,52428, // gray
- /* [2] */ wFrameColor, 0, 0, 0,
- /* [3] */ wTextColor, 0, 0, 0,
- /* [4] */ wHiliteColor, 0, 0, 0,
- /* [5] */ wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- resource 'DLOG' (190, "Tab Demo 3", purgeable) {
- {44, 20, 334, 470}, movableDBoxProc, invisible, nogoAway, 0x0, 190,
- "Tab Demo 3",
- #if SystemSevenOrLater
- centerMainScreen
- #endif
- };
-
- resource 'DITL' (190, "Tab Demo 3", purgeable) {
- {
- /* [1] */ {257, 379, 277, 437}, Button { enabled, "OK" },
- /* [2] */ {257, 308, 277, 366}, Button { enabled, "Cancel"},
- /* [3] */ {13, 13, 13+ROW3, 437}, Control { enabled, 190 },
- /* [4] */ {257, 13, 277, 300}, StaticText { disabled,
- "Press cmd-Tab or cntl-Tab"}
- }
- };
-
- resource 'CNTL' (190, "4 tabs", purgeable) {
- {13, 13, 13+ROW3, 437},
- 1,
- visible,
- 10,
- 230,
- 16*tabPanel,
-
- $00280000, // a 'notch' of 40 and default to 4 tabs
- // per row - 2 full, 1 partial row
-
- "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
- };
- // -----------------------------------------------------------------------------
- // the fourth tabDemo shows a panel with 10 tabs, but all in a single row.
- // -----------------------------------------------------------------------------
- resource 'dctb' (200, purgeable) {
- {
- /* [1] */ wContentColor, 52428,52428,52428, // gray
- /* [2] */ wFrameColor, 0, 0, 0,
- /* [3] */ wTextColor, 0, 0, 0,
- /* [4] */ wHiliteColor, 0, 0, 0,
- /* [5] */ wTitleBarColor, 65535, 65535, 65535
- }
- };
-
- resource 'DLOG' (200, "Tab Demo 4", purgeable) {
- {44, 20, 334, 470}, movableDBoxProc, invisible, nogoAway, 0x0, 200,
- "Tab Demo 4",
- #if SystemSevenOrLater
- centerMainScreen
- #endif
- };
-
- resource 'DITL' (200, "Tab Demo 4", purgeable) {
- {
- /* [1] */ {257, 379, 277, 437}, Button { enabled, "OK" },
- /* [2] */ {257, 308, 277, 366}, Button { enabled, "Cancel"},
- /* [3] */ {13, 13, 13+ROW1, 437}, Control { enabled, 200 },
- /* [4] */ {257, 13, 277, 300}, StaticText { disabled,
- "Press cmd-Tab or cntl-Tab"}
- }
- };
-
- resource 'CNTL' (200, "1 row of tabs", purgeable) {
- {13, 13, 13+ROW1, 437},
- 1,
- visible,
- 10,
- 230,
- 16*tabPanel+oneTabRow,
- 0,
- "Tab 1\nTab 2\nTab 3\nTab 4\nTab 5\nTab 6\nTab 7\nTab 8\nTab 9\nTab 10"
- };
-
- // -----------------------------------------------------------------------------
- // the following DITLs are shared by all of the demos above.
- // -----------------------------------------------------------------------------
- resource 'DITL' (161, "Tab panel 1", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 1" }
- }
- };
- resource 'DITL' (162, "Tab panel 2", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 2" }
- }
- };
- resource 'DITL' (163, "Tab panel 3", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 3" }
- }
- };
- resource 'DITL' (164, "Tab panel 4", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 4" }
- }
- };
- resource 'DITL' (165, "Tab panel 5", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 5" }
- }
- };
- resource 'DITL' (166, "Tab panel 6", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 6" }
- }
- };
- resource 'DITL' (167, "Tab panel 7", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 7" }
- }
- };
- resource 'DITL' (168, "Tab panel 8", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 8" }
- }
- };
- resource 'DITL' (169, "Tab panel 9", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 9" }
- }
- };
- resource 'DITL' (170, "Tab panel 10", purgeable) {
- {
- /* [1] */ {66, 20, 82, 220}, StaticText { disabled, "Panel 10" }
- }
- };